package com.changgou.pay.config;

import com.github.wxpay.sdk.MyConfig;
import com.github.wxpay.sdk.WXPay;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: HuangFu
 * @Date: 2020/2/19 10:22
 * @Description: 资源配置类
 */
@Configuration
public class ResourceServerConfig {

    /**
     * 微信支付类
     * @return
     */
    @Bean
    public WXPay wxPay(){
        try {
            return new WXPay(new MyConfig());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
